Skip navigation links

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Big Data Appliance Perfect Balance Java API Reference Release 1 (1.0) E41667-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.hadoop.balancer.examples.invindx
Class InvertedIndexMapred.InvertedIndexReducer

`java.lang.Object
org.apache.hadoop.mapred.MapReduceBase
oracle.hadoop.balancer.examples.invindx.InvertedIndexMapred.InvertedIndexReducer`

All Implemented Interfaces:
  java.io.Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Reducer<InvertedIndex.InvertedIndexKey,InvertedIndex.InvertedIndexValue,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>

Enclosing class:
  InvertedIndexMapred

      public static class InvertedIndexMapred.InvertedIndexReducer

extends org.apache.hadoop.mapred.MapReduceBase
implements org.apache.hadoop.mapred.Reducer<InvertedIndex.InvertedIndexKey,InvertedIndex.InvertedIndexValue,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>

The inverted index reducer class for mapred API

Constructor Summary
`InvertedIndexMapred.InvertedIndexReducer()`

Method Summary
`void` | `configure(org.apache.hadoop.mapred.JobConf job)`
`void` | `reduce(InvertedIndex.InvertedIndexKey key, java.util.Iterator<InvertedIndex.InvertedIndexValue> values, org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text> collector, org.apache.hadoop.mapred.Reporter reporter)` The reduce function.

Methods inherited from class org.apache.hadoop.mapred.MapReduceBase
`close`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface java.io.Closeable
`close`

Constructor Detail

### InvertedIndexMapred.InvertedIndexReducer

    public InvertedIndexMapred.InvertedIndexReducer()

Method Detail

### configure

    public void configure(org.apache.hadoop.mapred.JobConf job)

  Specified by:
    `configure` in interface `org.apache.hadoop.mapred.JobConfigurable`
  Overrides:
    `configure` in class `org.apache.hadoop.mapred.MapReduceBase`

### reduce

    public void reduce(InvertedIndex.InvertedIndexKey key,
                       java.util.Iterator<InvertedIndex.InvertedIndexValue> values,
                       org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text> collector,
                       org.apache.hadoop.mapred.Reporter reporter)
                throws java.io.IOException

  The reduce function. The output per line is:
  - word <location:offset:numOccurrencesAtOffset>
  Since the values per key are in sorted order, we can merge consecutive duplicate locations per word.
  Specified by:
    `reduce` in interface `org.apache.hadoop.mapred.Reducer<InvertedIndex.InvertedIndexKey,InvertedIndex.InvertedIndexValue,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>`
  Throws:
    `java.io.IOException`

Skip navigation links

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Big Data Appliance Perfect Balance Java API Reference Release 1 (1.0) E41667-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.